fitpack Module



Interfaces

public interface fitpack_curve

  • private function new_from_points(x, y, w, ierr) result(this)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=RKIND), intent(in) :: x(:)
    real(kind=RKIND), intent(in) :: y(size(x))
    real(kind=RKIND), intent(in), optional :: w(size(x))
    integer, intent(out), optional :: ierr

    Return Value type(fitpack_curve)

public interface fitpack_surface

  • private function surf_new_from_points(x, y, z, w, ierr) result(this)

    Arguments

    Type IntentOptional Attributes Name
    real(kind=RKIND), intent(in) :: x(:)
    real(kind=RKIND), intent(in) :: y(size(x))
    real(kind=RKIND), intent(in) :: z(size(x))
    real(kind=RKIND), intent(in), optional :: w(size(x))
    integer, intent(out), optional :: ierr

    Return Value type(fitpack_surface)


Derived Types

type, public ::  fitpack_curve

A public type describing a curve fitter y = c(x)

Components

Type Visibility Attributes Name Initial
integer, public :: bc = OUTSIDE_NEAREST_BND
real(kind=RKIND), public, allocatable :: c(:)
real(kind=RKIND), public :: fp = zero
integer, public :: iopt = 0
integer, public, allocatable :: iwrk(:)
integer, public :: knots = 0
integer, public :: lwrk = 0
integer, public :: m = 0

The data points

integer, public :: nest = 0
integer, public :: order = 3

Spline degree

real(kind=RKIND), public :: smoothing = 1000.0_RKIND
real(kind=RKIND), public, allocatable :: sp(:)
real(kind=RKIND), public, allocatable :: t(:)
real(kind=RKIND), public, allocatable :: w(:)
real(kind=RKIND), public, allocatable :: wrk(:)
real(kind=RKIND), public, allocatable :: x(:)
real(kind=RKIND), public :: xleft

Interval boundaries

real(kind=RKIND), public :: xright

Interval boundaries

real(kind=RKIND), public, allocatable :: y(:)

Constructor

private function new_from_points (x, y, w, ierr)

Type-Bound Procedures

procedure, public :: destroy

Clean memory

generic, public :: dfdx => curve_derivative, curve_derivatives
generic, public :: eval => curve_eval_one, curve_eval_many
procedure, public :: fit => curve_fit_automatic_knots

Generate/update fitting curve, with optional smoothing

procedure, public :: interpolate => interpolating_curve
procedure, public, non_overridable :: mse => curve_error
procedure, public :: new_fit

Generate new fit

procedure, public :: new_points

Set new points

type, public ::  fitpack_surface

A public type describing a surface fitter z = s(x,y)

Components

Type Visibility Attributes Name Initial
integer, public :: bc = OUTSIDE_NEAREST_BND
real(kind=RKIND), public, allocatable :: c(:)
real(kind=RKIND), public :: fp = zero
integer, public :: iopt = 0
integer, public, allocatable :: iwrk(:)
integer, public :: knots(2) = 0
real(kind=RKIND), public :: left(2)

Interval boundaries

integer, public :: liwrk = 0
integer, public :: lwrk1 = 0
integer, public :: lwrk2 = 0
integer, public :: m = 0

The data points

integer, public :: nest(2) = 0
integer, public :: nmax = 0
integer, public :: order(2) = 3

Spline degree

real(kind=RKIND), public :: right(2)

Interval boundaries

real(kind=RKIND), public :: smoothing = 1000.d0
real(kind=RKIND), public, allocatable :: t(:,:)
real(kind=RKIND), public, allocatable :: w(:)
real(kind=RKIND), public, allocatable :: wrk1(:)
real(kind=RKIND), public, allocatable :: wrk2(:)
real(kind=RKIND), public, allocatable :: x(:)
real(kind=RKIND), public, allocatable :: y(:)
real(kind=RKIND), public, allocatable :: z(:)

Constructor

private function surf_new_from_points (x, y, z, w, ierr)

Type-Bound Procedures

procedure, public :: destroy => surf_destroy

Clean memory

procedure, public :: fit => surface_fit_automatic_knots

Generate/update fitting curve, with optional smoothing

procedure, public :: new_fit => surf_new_fit

Generate new fit

procedure, public :: new_points => surf_new_points

Set new points